Programming with algebraic effects and handlers
نویسندگان
چکیده
منابع مشابه
Programming with algebraic effects and handlers
Eff is a programming language based on the algebraic approach to computational effects, in which effects are viewed as algebraic operations and effect handlers as homomorphisms from free algebras. Eff supports first-class effects and handlers through which we may easily define new computational effects, seamlessly combine existing ones, and handle them in novel ways. We give a denotational sema...
متن کاملHandlers of Algebraic Effects
We present an algebraic treatment of exception handlers and, more generally, introduce handlers for other computational effects representable by an algebraic theory. These include nondeterminism, interactive input/output, concurrency, state, time, and their combinations; in all cases the computation monad is the free-model monad of the theory. Each such handler corresponds to a model of the the...
متن کاملNo value restriction is needed for algebraic effects and handlers
We present a straightforward, sound, Hindley-Milner polymorphic type system for algebraic effects and handlers in a call-by-value calculus, which, to our surprise, allows type variable generalisation of arbitrary computations, and not just values. We first recall that the soundness of unrestricted call-byvalue Hindley-Milner polymorphism is known to fail in the presence of computational effects...
متن کاملAn Effect System for Algebraic Effects and Handlers
We present an effect system for algebraic effects and handlers. Because handlers may transform an effectful computation into a pure one, the effect system is non-monotone in the sense that effects do not just accumulate, but may also be deleted from types or generally transformed. We also provide denotational semantics for the effect system, based on a domain-theoretic model with partial equiva...
متن کاملAn Introduction to Algebraic Effects and Handlers. Invited tutorial paper
This paper is a tutorial on algebraic effects and handlers. In it, we explain what algebraic effects are, give ample examples to explain how handlers work, define an operational semantics and a type & effect system, show how one can reason about effects, and give pointers for further reading.
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
ژورنال
عنوان ژورنال: Journal of Logical and Algebraic Methods in Programming
سال: 2015
ISSN: 2352-2208
DOI: 10.1016/j.jlamp.2014.02.001